package gdou.gym.entity;

import java.util.Objects;

public class Admin extends People {


    private static final long serialVersionUID = -2423719913222583927L;
    private Integer no;

    private String account;


    @Override
    public String getAccount() {
        return this.account;
    }

    @Override
    public String getPsw() {
        return this.psw;
    }

    private String psw;

    private String phone;

    public Integer getNo() {
        return no;
    }

    public void setNo(Integer no) {
        this.no = no;
    }


    public void setAccount(String account) {
        this.account = account == null ? null : account.trim();
    }


    public void setPsw(String psw) {
        this.psw = psw == null ? null : psw.trim();
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone == null ? null : phone.trim();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Admin)) return false;
        Admin admin = (Admin) o;
        return Objects.equals(getNo(), admin.getNo()) && Objects.equals(getAccount(), admin.getAccount()) && Objects.equals(getPsw(), admin.getPsw()) && Objects.equals(getPhone(), admin.getPhone());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getNo(), getAccount(), getPsw(), getPhone());
    }

    @Override
    public String toString() {
        return "Admin{" +
                "no=" + no +
                ", account='" + account + '\'' +
                ", psw='" + psw + '\'' +
                ", phone='" + phone + '\'' +
                '}';
    }
}